package com.zealfi.wk.controller;

import com.zealfi.wk.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("consume")
public class ConsumerController {

    @Autowired
    HelloService helloService;

    @RequestMapping(method = RequestMethod.GET)
    public String get() {
        return helloService.hello();
    }

//    @RequestMapping(method = RequestMethod.POST)
//    public String post() {
//        return restTemplate.postForObject("http://HELLO-SERVICE/hello", null, String.class);
//    }
//
//    @RequestMapping(method = RequestMethod.PUT)
//    public String put() {
//        restTemplate.put("http://HELLO-SERVICE/hello", null);
//        return "ok";
//    }
//
//    @RequestMapping(method = RequestMethod.DELETE)
//    public String delete() {
//        restTemplate.delete("http://HELLO-SERVICE/hello");
//        return "ok";
//    }
}
